In object-oriented programming (OOP), the concept of “inheritance” offers a way to compartmentalize and reuse code by creating collections of attributes and behaviors called objects, which can be based on previously created objects. In a classical inheritance scheme, objects are defined by classes, and classes can inherit other classes. The new classes, known as sub-classes (or derived classes), inherit attributes and behaviors of the pre-existing classes, which are referred to as super-classes (or ancestor classes). The inheritance relationship of sub- and super-classes gives rise to a hierarchy of classes, or objects. Although the concept seems quite clear and useful in theory, in actual practice a whole host of problems may arise.
First, the practical application of inheritance in an object oriented approach results in the atomization of objects, which, if taken to the extreme, can ultimately result in an unmanageable number of individual objects. This problem is known to exist in relation to the Hypertext Markup Language (HTML) constructor set, for which each single tag of an HTML page has its own class representation, making it nearly impossible to design an HTML page using the concept. Another problem that frequently arises is the misuse of inheritance as a replacement for type definition. This problem is exhibited, for example, by the overuse of object derivations of the Exception class, “java.lang.Exception.” Yet another set of problems arise when an object oriented approach allows for the concept of multiple inheritance. For instance, multiple inheritances often results in problems involving semantic ambiguity, the inability to explicitly inherit multiple items from a single class, and class semantics changing due to the order of inheritance.
Another problem with conventional object oriented programming approaches is the inability to map objects to transient entities. Take for example the model shown in FIG. 1, which shows the classes “CHILD” and “ADULT” as specializations of the class, “PERSON”. As a child ages, he or she becomes an adult. However, the model shown in FIG. 1, which is consistent with conventional approaches to object oriented languages and programming, does not define when or what happens if a child becomes an adult as a result of an increase in an attribute, “age”. In this simplified example, the transition that naturally occurs is quite obvious. However, in practice, the transition that occurs may be less perceptible.